<template>
  <div class="common-layout">
    <el-container>
      <el-header>Header</el-header>
      <el-container>
        <el-aside width="200px">Aside</el-aside>
        <el-main
          >Main
          <hr />
          <p>欢迎登录，{{ username }}</p>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup>
// import { useRoute } from "vue-router";
// const route = useRoute();
// const username = route.query.username;
import { useLoginStore } from "@/store/loginStore.js";
import { useMainStore } from "@/store/mainStore.js";

const loginStore = useLoginStore();
// const username = loginStore.username;
const username = loginStore.getUsername();
</script>
<style scoped>
.el-header {
  background-color: #409eff;
  color: #fff;
  text-align: center;
  line-height: 8vh;
  height: 8vh;
}
.el-aside {
  color: #333;
  background-color: #598ee6;
  height: 92vh;
}
.el-main {
  color: #333;
  background-color: #eef1f6;
  text-align: center;
  line-height: 160px;
}
</style>
